<?php
class ModelAccountRechargeablecard extends Model {

	public function getRechargeablecard($cardNumber) {
      	return $this->db->queryOne("SELECT DISTINCT * FROM  @@rechargeablecard WHERE cardNumber= " . $cardNumber);
	}

	public function editRechargeablecard($cardNumber, $data) {
		$data['cardDate'] = $GLOBALS['V5_NOW'];
		$this->db->update('rechargeablecard', $data, array('cardNumber' => $cardNumber));
	}

    public function getCouponcards() {
        $sql = "SELECT c.couponID,c.lowAmount,c.highAmount,c.reward FROM  @@couponcard c";
        $query = $this->db->query($sql);
        return $query->rows;
    }

}
?>